package com.infore.remoteControl.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import com.infore.remoteControl.entity.instructionsEntity.InstructionsData;


@Repository
public interface IInstructionDataRepository extends JpaRepository<InstructionsData, String>, JpaSpecificationExecutor<InstructionsData>{

	/** 分页查询(指令状态排序) **/
	Page<InstructionsData> findByOrderByState(Pageable pageable);
	/** 指令状态排序 **/
	List<InstructionsData> findByOrderByState();
	/** 根据设备ID查询 **/
	InstructionsData findByEquipmentId(String equipmentId);
	/** 根据设备ID查询 **/
	List<InstructionsData> findByEquipmentIdIn(List<String> equipmentIds);
}
